package utils.titles;

import com.google.gson.*;

import java.lang.reflect.Type;

public class TitleDeserializer implements JsonDeserializer<Title> {
    @Override
    public Title deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
        return Title.fromCapitalized(json.getAsString());
    }
}
